package com.lsl.bhllserver.service.order;

import java.util.List;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Caching;
import org.springframework.stereotype.Service;

import com.lsl.bhllserver.entity.Order;

@Service
public class AdminOrderService extends OrderService {
    
    @CacheEvict(value = "allOrders", key = "'allOrders'")
    public boolean deleteOrder(Integer oid) {
        return orderDAO.delete(oid);
    }

    @Cacheable(value = "allOrders", key = "'allOrders'")
    public List<Order> getAllOrder() {
        return orderDAO.getAll();
    }
}
